Skip to content

chore: pin react/react-dom to 18.3.1 for deterministic dedupe#488

Merged
mrholek merged 1 commit into
mainfrom
chore/pin-react
Jun 29, 2026
Merged

chore: pin react/react-dom to 18.3.1 for deterministic dedupe#488
mrholek merged 1 commit into
mainfrom
chore/pin-react

Conversation

@mrholek

@mrholek mrholek commented Jun 29, 2026

Copy link
Copy Markdown
Member

Adds a resolutions pin so the monorepo always installs a single react@18.3.1 instance.

The docs workspace (@coreui/react-docs) depends on react@^19.2.7. yarn can hoist react@19 to the repo root and push the library + react-dom onto their own nested react@18 copies — multiple React instances → "invalid hook call" (useRef on null) in jsdom tests. That is exactly what was failing ~144 test suites in coreui-react-pro (fixed there with the same pin). coreui-react happens to hoist react@18 today, so its tests pass — but only by luck of install order. This pin makes it deterministic.

No behavior change; lib build + tests stay green (129 suites / 365 tests).

The docs workspace (@coreui/react-docs) depends on react@19, which yarn can
hoist to the repo root and split the library/react-dom onto duplicate nested
react@18 copies — exactly what broke coreui-react-pro's tests ("invalid hook
call"). coreui-react currently avoids this only by luck of the hoist order; a
resolutions pin makes a single react@18.3.1 instance deterministic across installs.
@mrholek mrholek merged commit 694ec9e into main Jun 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant